<?php
if (!defined('_DSN')) define('_DSN', 'mysql:host=localhost;dbname=ga;charset=utf8');
if (!defined('_DB_HOST')) define('_DB_HOST', 'localhost');
if (!defined('_DB_NAME')) define('_DB_NAME', 'ga');
if (!defined('_DB_USERNAME')) define('_DB_USERNAME', 'root');
if (!defined('_DB_PASSWORD')) define('_DB_PASSWORD', '');

$db = mysql_connect(_DB_HOST, _DB_USERNAME, _DB_PASSWORD);
mysql_select_db(_DB_NAME);
mysql_query("set names utf8");

//if (!defined('_DB_HOST')) define('_DB_HOST', 'localhost');
//$db = new PDO(_DSN, _DB_USERNAME, _DB_PASSWORD);
//$db->exec("SET NAMES utf8");
//$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);

